package com.example.zk2_lx.video;

import androidx.lifecycle.MutableLiveData;

import com.example.zk2_lx.entity.ResultEntity;
import com.example.zk2_lx.entity.VideoEntity;
import com.example.zk2_lx.mvvm.BaseViewModel;

public class VideoViewModel extends BaseViewModel<VideoRepo> {
    @Override
    protected VideoRepo createRepo() {
        return new VideoRepo();
    }

    public MutableLiveData<VideoEntity> success = new MutableLiveData<>();
    public MutableLiveData<String> fail = new MutableLiveData<>();

    public void video(int page,int size){
        repo.video(page,size,success,fail);
    }

    public MutableLiveData<ResultEntity> loveSucc = new MutableLiveData<>();
    public MutableLiveData<String> lovFail = new MutableLiveData<>();
    public void love(int id){
        repo.love(id,loveSucc,lovFail);
    }
    public MutableLiveData<ResultEntity> noloveSucc = new MutableLiveData<>();
    public MutableLiveData<String> nolovFail = new MutableLiveData<>();
    public void nolove(int id){
        repo.nolove(id,noloveSucc,nolovFail);
    }
}
